//
// Created by Administrator on 2021/1/31 0031.
//

#ifndef JQHMUSIC_JQHQUEUE_H
#define JQHMUSIC_JQHQUEUE_H

#include "queue"
#include "pthread.h"
#include "AndroidLog.h"
#include "JqhPlayStatus.h"
extern "C" {
    #include <libavcodec/avcodec.h>
};
class JqhQueue {

public:
    std::queue<AVPacket *> queuePacket;
    pthread_mutex_t mutexPacker;
    pthread_cond_t condPacket;
    JqhPlayStatus *playStatus = NULL;
public:
    JqhQueue(JqhPlayStatus *playStatus);
    ~JqhQueue();

    int putAVPacket(AVPacket *packet);
    int getAVPacket(AVPacket *packet);
    int getQueueSize();
    void clearAvpacket();
};


#endif //JQHMUSIC_JQHQUEUE_H
